import http from '@/utils/http'
const order = http;
// 预约
// 选择就诊人  根据登录用户id查找绑定的所有就诊人
export const doctorSelPer = (
	id
) => {
	return order({
		url: '/patient/list',
		params: {
			id
		}
	})
}
//获取院区
export const getPart = () => {
	return order({
		url: '/app/partList'
	})
}
//获取大科室 
export const getBig = () => {
	return order({
		url: '/app/bigNames'
	})
}
//获取科室
export const getDepartments = (partId, bigName) => {
	return order({
		url: '/app/departments',
		params: {
			partId,
			bigName
		}
	})
}

// 获取科室医生信息
export const doctorInfo = ({departmentName,day}) => {
	return order({
		url: '/app/doctors',
		method: 'GET',
		params: {
			departmentName,
			day
		}
	})
}
// 获取当周日期
export const weekDay = () => {
	return order({
		url: '/app/week'
	})
}
// 获取排班时间点信息：剩余预约数量
export const dateSel = ({doctorName,workDate}) => {
	return order({
		url: '/app/timeAndNum',
		method: 'GET',
		params: {
			doctorName,
			workDate
		}
	})
}
// 住院服务里面的问题反馈
export const qusition = (data) => {
	return order({
		url: '/addFeedBack/add',
		method: 'post',
		data
	})
}
// 根据医生id获取大于等于今天的该医生的排班信息
export const doctorRange = (doctorId) => {
	return order({
		url: '/app/doctorSchedules',
		method: 'GET',
		params: {
			doctorId
		}
	})
}